package com.mallcloud.mall.admin.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mallcloud.mall.common.core.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@ApiModel(value = "SysMenu", description = "菜单")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_sys_menu", autoResultMap = true)
public class SysMenu extends BaseModel {
	private static final long serialVersionUID = 1L;

	@TableId(value = "menu_id", type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "菜单id")
	private Long menuId;

	@NotBlank(message = "菜单名称不能为空")
	@ApiModelProperty(value = "菜单名称")
	private String name;

	@ApiModelProperty(value = "菜单权限标识")
	private String permission;

	@NotNull(message = "菜单父ID不能为空")
	@ApiModelProperty(value = "菜单父id")
	private Long parentId;

	@ApiModelProperty(value = "菜单图标")
	private String icon;

	@ApiModelProperty(value = "前端路由标识路径")
	private String path;

	@ApiModelProperty(value = "排序值")
	private Integer sortOrder;

	@NotNull(message = "菜单类型不能为空")
	@ApiModelProperty(value = "菜单类型,0:菜单 1:按钮 2:顶菜单")
	private String menuType;

	@ApiModelProperty(value = "路由缓冲")
	private String keepAlive;

}
